<?php
//测试控制器类
class IndexController extends Controller{
    //动作方法
    public function index(){
        //显示视图
        $this->display();
    }
    public function add(){
    	if(IS_POST){
    		$Model = K('News');
    		$Model->create();
    		$Model->add();
    	}
    }
    public function one(){
    	$Model= K('News');
    	$field= $Model->find($_GET['id']);
    	$this->assign('field',$field);
    	$this->display('one');
    }
}
